package com.manner.groupon.model.vo;

import com.manner.groupon.model.entity.GrouponCoupons;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * 团购券返回对象
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class GroupCouponVo extends GrouponCoupons {

    /**
     * 套餐项数据
     */
    private List<GroupCouponPackageVo> list;

    public GroupCouponVo(GrouponCoupons grouponCoupons, List<GroupCouponPackageVo> list) {
        super(
                grouponCoupons.getId(),
                grouponCoupons.getStoreId(),
                grouponCoupons.getTitle(),
                grouponCoupons.getImg(),
                grouponCoupons.getPrice(),
                grouponCoupons.getEffectDay(),
                grouponCoupons.getCanBuy(),
                grouponCoupons.getIsToGo(),
                grouponCoupons.getDiscount(),
                grouponCoupons.getProfit(),
                grouponCoupons.getSoldCount(),
                grouponCoupons.getUnLinePrice(),
                grouponCoupons.getStock(),
                grouponCoupons.getStatus(),
                grouponCoupons.getIsDelete(),
                grouponCoupons.getCreateTime(),
                grouponCoupons.getUpdateTime()
        );
        this.list = list;
    }

}
